package io.jt808.proto.item;


import io.norland.buffer.AutoBuffer;
import io.norland.proto.IProto;

public class PositionAdditional31GNSS implements IProto {
    private byte gnss;

    public byte[] writeToBytes() {
        return new byte[]{this.gnss};
    }

    public void readFromBuf(AutoBuffer buffer) {
        this.gnss = buffer.readByte();
    }

    public byte getGnss() {
        return this.gnss;
    }

    public void setGnss(byte gnss) {
        this.gnss = gnss;
    }

    public boolean equals(Object o) {
        if (o == this) return true;
        if (!(o instanceof PositionAdditional31GNSS)) return false;
        PositionAdditional31GNSS other = (PositionAdditional31GNSS) o;
        if (!other.canEqual(this)) return false;
        return getGnss() == other.getGnss();
    }

    protected boolean canEqual(Object other) {
        return other instanceof PositionAdditional31GNSS;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        return result * 59 + getGnss();
    }

    public String toString() {
        return "PositionAdditional31GNSS(gnss=" + getGnss() + ")";
    }
}